# -*- coding: utf-8 -*-
# @Time    : 2024/1/7 20:30
# @Author  : micah
# @File    : 3.抓取蜻蜓FM排行榜数据.py
# @Software: PyCharm


import requests

api_url = 'https://webapi.qingting.fm/api/mobile/rank/hotSaleWeekly'
headers = {
    "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"
}

response = requests.get(api_url, headers=headers).json()

data_list = response['rankinglist']
for temp in data_list:
    print(temp['title'], temp['desc'])
